package com.maisuiit.pattern.appearance;

import com.maisuiit.pattern.appearance.AliSmsService;
import com.maisuiit.pattern.appearance.AliSmsServiceImpl;
import com.maisuiit.pattern.appearance.EamilSmsServiceImpl;
import com.maisuiit.pattern.appearance.WeiXinSmsServiceImpl;

/**
 * @author zhangcc
 * @date 2021-07-13
 */
public class Computer {

    AliSmsService aliSmsService;
    EamilSmsService eamilSmsService;
    WeiXinSmsService weiXinSmsService;

    public Computer() {
        aliSmsService = new AliSmsServiceImpl();
        eamilSmsService = new EamilSmsServiceImpl();
        weiXinSmsService = new WeiXinSmsServiceImpl();
    }

    //只需要调用它
    public void sendMsg() {
        aliSmsService.sendSms();
        eamilSmsService.sendSms();
        weiXinSmsService.sendSms();
    }

}
